
<form method="post"
	action="${rc.getContextPath()}/manage/workflowBusiness/saveBusinessField"
	class="pageForm required-validate"
	onsubmit="return validateCallback(this, dialogAjaxDone);">
	<div class="pageContent">
		<div class="pageFormContent" layoutH="50">
			<input type="hidden" name="navTabId" value=""> <input
				type="hidden" name="businessType"
				value="${businessField.businessType!''}">

			<fieldset class="dataset">
				<dl>
					<dt><@label key="businessField.C,colon">业务字段：</@label></dt>
					<dd>
						<input name="businessField" size="32" type="text" maxlength="30"
							class="required alphanumeric toUp"
							value="${businessField.businessField!''}" readonly="true" />
					</dd>
				</dl>
				<dl>
					<dt><@label key="fieldLabel.C,colon">字段标签：</@label></dt>
					<dd>
						<input name="fieldLabel" size="32" type="text" maxlength="30"
							class="required "
							value="${businessField.fieldLabel!''}" readonly="true" />
					</dd>
				</dl>
				<dl>
					<dt><@label key="dbField.C,colon">数据库字段：</@label></dt>
					<dd>
						<input name="dbField" size="32" type="text" maxlength="30"
							class="required lettersonly toUp"
							value="${businessField.dbField!''}" readonly="true" />
					</dd>
				</dl>
				<dl>
					<dt><@label key="fieldDescription.C,colon">字段描述：</@label></dt>
					<dd>
						<input name="fieldDescription" size="32" type="text"
							maxlength="255" value="${businessField.fieldDescription!''}"
							readonly="true" />
					</dd>
				</dl>
				<dl>
					<dt><@label key="DataType.C,colon">数据类型：</@label></dt>
					<dd>
						<select name="dataType" disabled="disabled"> <#list
							businessFieldDataTypes as type>
							<option value="${type.dataType}"<#if businessField.dataType
								== type.dataType> selected="selected"</#if>>${type.text}</option>
							</#list>
						</select>
					</dd>
				</dl>
				<dl>
					<dt><@label key="fieldType.C,colon"
						disabled="disabled">字段类型：</@label></dt>
					<dd>
						<select name="fieldType" disabled="disabled"> <#list
							businessFieldTypes as type>
							<option value="${type.id}"<#if
								businessField.fieldType == type.id>
								selected="selected"</#if>>${type.text}</option> </#list>
						</select>

					</dd>
				</dl>
				<dl>
					<dt><@label key="defaultValue.C,colon">默认值：</@label></dt>
					<dd>
						<input name="defaultValue" size="32" type="text" maxlength="255"
							value="${businessField.defaultValue!''}" readonly="true" />
					</dd>
				</dl>
				<dl>
					<dd>
						<label style="width: 150px;"><input type="checkbox"
							name="requiredFlag" value="1"<#if
							(businessField.requiredFlag == 1)> checked="true"</#if>
							disabled="disabled"/><@label key="requiredFlag.C">必填</@label></label>
					</dd>
				</dl>
				<dl>
					<dt><@label key="maximumValue.C,colon">最大值：</@label></dt>
					<dd>
						<input name="maximumValue" size="32" type="text" maxlength="255"
							value="${businessField.maximumValue!''}" readonly="true" />
					</dd>
				</dl>
				<dl>
					<dt><@label key="minValue.C,colon">最小值：</@label></dt>
					<dd>
						<input name="minimumValue" size="32" type="text" maxlength="255"
							value="${businessField.minimumValue!''}" readonly="true" />
					</dd>
				</dl>
				<dl>
					<dt><@label key="length.C,colon">长度：</@label></dt>
					<dd>
						<input name="length" size="32" type="text" maxlength="4" class="number"
							readonly="true" value="${businessField.length!''}" />
					</dd>
				</dl>
				<dl>
					<dt><@label key="scale.C,colon">小数位数：</@label></dt>
					<dd>
						<input name="scale" size="32" type="text" maxlength="4"  class="number"
							value="${businessField.scale!''}" readonly="true" />
					</dd>
				</dl>
				<dl>
					<dt><@label key="validationExpression.C,colon">验证表达式：</@label></dt>
					<dd>
						<input name="validationExpression" size="32" type="text"
							maxlength="255" readonly="true"
							value="${businessField.validationExpression!''}" />
					</dd>
				</dl>
				<dl>
					<dd>
						<label style="width: 150px;"><input type="checkbox"
							name="systemFieldFlag" value="1"<#if
							(businessField.systemFieldFlag == 1)> checked="true"</#if>
							disabled="disabled"><@label
							key="systemFieldFlag.C">系统字段</@label></label>
					</dd>
				</dl>
				<dl class="nowrap" display-ref='DYNAMICOPTION'>
					<dt><@label key="querySql.C,colon">选项值查询语句：</@label></dt>
					<dd>
						<textarea name="querySql" cols="70" readonly="true" maxlength="2000">${businessField.querySql!''}</textarea>
					</dd>
				</dl>
				<dl class="nowrap" display-ref='STATICOPTION'>
					<dt><@label
						key="staticOptionsConfig.C,colon">静态选项值配置：</@label></dt>
					<dd style="width: 70%;">
						<table class="table border" width="100%" layoutH="300">
							<thead>
								<tr>
									<th width="100"><@label key="Enumeration.C">枚举值</@label></th>
									<th width="200"><@label
										key="EnumerationText.C">枚举值描述</@label></th>
								</tr>
							</thead>
							<tbody name="staticOptionTbody">
								<#if businessField.businessFieldValueList??> <#list
								businessField.businessFieldValueList as businessFieldValue>
								<tr rel="${businessFieldValue.value!''}">
									<td><input type="text" readonly="true" maxlength="255" class="textInput required alphanumeric toUp"
										name="businessFieldValueList[${businessFieldValue_index}].value"
										value="${businessFieldValue.value!}" /></td>
									<td><input type="text" readonly="true" maxlength="255"  class="textInput" 
										name="businessFieldValueList[${businessFieldValue_index}].valueText"
										value="${businessFieldValue.valueText!}" /></td>
								</tr>
								</#list> </#if>
							</tbody>
						</table>
		</div>
		</dd>
		</dl>

		</fieldset>
	</div>
	<div class="formBar">
		<ul>
			<li>
				<div class="buttonActive"">
					<div class="buttonContent">
						<button type="button" class="close"><@label
							key="close.B">关闭</@label></button>
					</div>
				</div>
			</li>
		</ul>
	</div>
	</div>
</form>
<script type="text/javascript">
    (function($){
       
    	 var page = DWZ.context();
    	var value = $("select[name='dataType']",page).val();
    	var dialog = $.pdialog.getCurrent();
           if("STATICOPTION" === value  ){
               
               $.pdialog.resizeDialog({style: {left:dialog.css("left"),top:dialog.css("top"),height:500,width:dialog.css("width")}},$.pdialog.getCurrent(),"se");
                $("dl[display-ref='STATICOPTION']",page).show();
                $("dl[display-ref='DYNAMICOPTION']",page).hide();
                setTimeout(function(){
                	 var page = DWZ.context();
	                $.each($("input[type='text']",$(".grid",page)),function(){
	                    $(this).css("width",$(this).parent().width()*0.65);
	                })
                },10)
           }else if("DYNAMICOPTION" === value){
        	   $.pdialog.resizeDialog({style: {left:dialog.css("left"),top:dialog.css("top"),height:370,width:dialog.css("width")}},$.pdialog.getCurrent(),"se");
               $("dl[display-ref='DYNAMICOPTION']",page).show();
               $("dl[display-ref='STATICOPTION']",page).hide();
           }else{
        	   $.pdialog.resizeDialog({style: {left:dialog.css("left"),top:dialog.css("top"),height:330,width:dialog.css("width")}},$.pdialog.getCurrent(),"se");
        	   $("dl[display-ref='DYNAMICOPTION']",page).hide();
               $("dl[display-ref='STATICOPTION']",page).hide();
           }
       
          
    })(jQuery);
    </script>